demos.Maincontrol = new Ext.TabPanel({
    id: 'maincontrol',
	cardSwitchAnimation: {
	    type: 'slide',
	    cover: true
	},
    defaults: {
        scroll: 'vertical',
        align: 'center',
    },
	items: [{
	        title: 'Home',
	        iconCls: 'home',
	        layout: {
	        	type: 'vbox',
	            pack: 'center'
	    	},
	    	items: [{
		        html: '<div align="center"><img src="css/img/home2.png" /><h1>Welcome to DLC EMR</h1><p>This is the Home Screen</p></div>',	    		
	    	}]
	    },
	    {
	        xtype: 'patientscard',
	        id: 'patients'
	    },
	    {
	        title: 'Messages',
	        iconCls: 'compose',
	        layout: {
	        	type: 'vbox',
	            pack: 'center'
	    	},
	    	cardSwitchAnimation: {
	    	    type: 'flip',
	    	    cover: true
	    	},
	    	items: [{
		        html: '<div align="center"><img src="css/img/mail.png" /><h1>Welcome to DLC EMR</h1><p>This is the Messages Screen</p></div>',
	    	}]
	    },
	    {
	        title: 'Settings',
	        iconCls: 'settings',
	        layout: {
	        	type: 'vbox',
	            pack: 'center'
	    	},
	    	cardSwitchAnimation: {
	    	    type: 'fade',
	    	    cover: true
	    	},
	    	items: [{
		        html: '<div align="center"><img src="css/img/settings6.png" /><h1>Welcome to DLC EMR</h1><p>This is the Settings Screen</p></div>',
	    	}]
	    },
	    {
	        title: 'More',
	        iconCls: 'more',
	        layout: {
	        	type: 'vbox',
	            pack: 'center'
	    	},
	    	cardSwitchAnimation: {
	    	    type: 'cube',
	    	    cover: true
	    	},
	    	items: [{
		        html: '<div align="center"><img src="css/img/wifi3.png" /><h1>Welcome to DLC EMR</h1><p>This is the link to More good stuff...</p></div>',
	    	}]
    }],
	tabBar: {
        dock: 'bottom',
        ui: 'dark',
		layout: {
            pack: 'center'
        },
        onTabTap: function(tab){
//    		Ext.Msg.alert('Tapped', 'Tab tapped!  "'+tab.card.id+'"', Ext.emptyFn)
//        	demos.Tabcontrol.setActiveItem(demos.Patientscard)
//        	demos.Tabcontrol.currentCard(demos.Patientscard)
            this.activeTab = tab;
            if (tab.card.id == 'patients' && this.cardLayout.getActiveItem().id == 'patients') console.debug('tapped');
            if (this.cardLayout) {
                this.cardLayout.setActiveItem(tab.card);
            }
            this.fireEvent('change', this, tab, tab.card);
        }
	},
});